﻿using System;
using System.Collections.Generic;
using UnityEngine;

public class GameObjectManager
{
    public static T findObjectByType<T>(Type type) where T : UnityEngine.Object
    {
        return GameObject.FindObjectOfType(type) as T;
    }

    public static void destroy(UnityEngine.Object obj)
    {
        GameObject.Destroy(obj);
    }

    public static GameObject instantiate(GameObject go, Vector3 position, Quaternion rotation)
    {
        return (GameObject)GameObject.Instantiate(go, position, rotation);
    }
}

